/**
 *******************************************************************************
 * @file stringFunc.h
 * @author .ISS_AUTO (hudandan@issauto.com)
 * @date 2025-04-01  1. 适配 MCU: N32G45x.
 *
 * @brief This file contains implementations of various string-related
 *        utility functions used across the application by o0.
 *
 * @copyright Copyright (c) 2025 ISSAUTO TECH Co., Ltd. All rights reserved.
 *
 *******************************************************************************
 */

#ifndef __STRING_FUNC_H
#define __STRING_FUNC_H

/* Includes ------------------------------------------------------------------*/
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>

/* Private define ------------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
#define o0_IS_CAP_LETTER(c)       (((c) >= 'A') && ((c) <= 'F'))
#define o0_IS_LC_LETTER(c)        (((c) >= 'a') && ((c) <= 'f'))
#define o0_IS_09(c)               (((c) >= '0') && ((c) <= '9'))

/* Exported functions --------------------------------------------------------*/
extern int o0_sscanf(const char *i_str, const char *format, ...);

extern void o0_Int2Str(unsigned char *o_str, unsigned int i_intnum);
extern int o0_Str2Int(unsigned char *i_str, unsigned int *o_intnum);
extern float o0_Str2float(const char *i_str);
extern int o0_Str2Hex(unsigned char *i_buf, unsigned char *o_buf, unsigned int o_len);
extern unsigned int o0_StrDelim(char *line, char *argv[], const unsigned int maxnum, const char *delim);

#endif/* __STRING_FUNC_H */

/* END OF FILE ---------------------------------------------------------------*/
